home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / Information / CSMP Digest / volume 1 / csmp-v1-132.txt < prev    next >
Encoding:
Text File  |  1994-12-08  |  39.6 KB  |  1,091 lines  |  [TEXT/R*ch]

  1. C.S.M.P. Digest             Sat, 04 Jul 92       Volume 1 : Issue 132
  2.  
  3. Today's Topics:
  4.  
  5.     TP4 Read and Wr-wr-wrap
  6.     PlotIconID - Why are my icons B&W?
  7.     Quadra, SFPGetFile, Bus Error = HELP!
  8.     Looking for apps that can receive data via AE!
  9.     Data fork from resource fork--How?
  10.     AESend returns OSErr -903
  11.     Special command keys
  12.     Background Printing Question?
  13.     Reading foreign disks
  14.     How to draw a SICN
  15.     button in a window
  16.     vdig component for DigiVideo (Q)
  17.  
  18.  
  19.  
  20. -------------------------------------------------------
  21.  
  22. From: macoll@qut.edu.au ((Ian MacColl))
  23. Subject: TP4 Read and Wr-wr-wrap
  24. Date: 30 May 92 15:23:33 EST
  25. Organization: Queensland University of Technology
  26.  
  27.  
  28. I tried everything I can think of but I can't get THINK Pascal 4 to:
  29.  
  30.    1 Wordwrap the Text window, or
  31.  
  32.    2 READ a char or integer without a CR to mark end of input
  33.  
  34. I've tried TP4 and TP4.01 on IIsi and SE machines with System 6.0.5 and
  35. 7.0.1 (with TuneUp 1.1.1) and INITS on and off.
  36.  
  37. Any WRITE or WRITELN with a parameter wider than the Text window writes the
  38. whole parameter (which can be checked by zooming the Text window) but simply
  39. continues it out of view under and to the right of the scroll bar. Also, a
  40. WRITE leaves the cursor immediately to the left of the scroll bar, 
  41. effectively in the middle of the output.
  42.  
  43. More seriously, a READ statement waits for a CR before processing any input.
  44. The problem, of course, is that this can easily leave the CR (converted to
  45. a space) in the input stream waiting for the next unsuspecting READ/READLN.
  46.  
  47. Has anyone else found these problems? Am I imagining them? Am I missing
  48. something? Are there controls or workarounds for these problems? Are these
  49. 'features' and not bugs?
  50.  
  51. Please reply here or by email to
  52.  
  53.      Internet:   macoll@qut.edu.au
  54.  
  55. Ian
  56.  
  57.  
  58. Ian MacColl ---------------------------------------------- macoll@qut.edu.au
  59. - ----------------------------------------------------------------------------
  60.  
  61. +++++++++++++++++++++++++++
  62.  
  63. From: jpugh@apple.com (Jon Pugh)
  64. Date: 3 Jun 92 20:47:25 GMT
  65. Organization: Apple Co.
  66.  
  67. In article <1992May30.152333.48870@qut.edu.au>, macoll@qut.edu.au ((Ian MacColl)) writes:
  68. > I tried everything I can think of but I can't get THINK Pascal 4 to:
  69. >  
  70. >    1 Wordwrap the Text window, or
  71. >  
  72. >    2 READ a char or integer without a CR to mark end of input
  73.  
  74. These are standard problems with Pascal.  If you want to do anything more 
  75. fancy than single line IO you have to go to the OS.  In this case, that's
  76. the toolbox and the Window Manager.  You could use TextEdit if you were
  77. inclined, but the gist is that it's a limitation of Pascal.
  78.  
  79. I had to write a lot of custom VMS IO routines to do real time games in Pascal
  80. while I was in college.  It's not fun, but it's not that hard either.  The
  81. simplest thing is to write a real Macintosh application using the THINK Class
  82. Library.  Of course, that's just one more learning curve to climb.
  83.  
  84. Jon
  85.  
  86. ---------------------------
  87.  
  88. From: jpurlia@qualcomm.com (John Purlia)
  89. Subject: PlotIconID - Why are my icons B&W?
  90. Organization: Qualcomm Incorporated
  91. Date: Mon, 1 Jun 1992 01:26:44 GMT
  92.  
  93. I'm trying to use System 7's handy PlotIconID function to display small
  94. color icons in a dialog box, but the icons always appear black & white.
  95. There are two places I'm attempting to plot the icons in the dialog:
  96. a user item, and within an LDEF.  I should also note that the dialog itself
  97. is being tossed about via SFPGetFile and extensions I've made to standard
  98. get file.
  99.  
  100. All my icon resources are defined, the destination Rect for each icon is
  101. 16 x 16 pixels, and I am able to draw color pictures in the dialog... but
  102. no color icons.
  103.  
  104. Any insight ino this problem?
  105.  
  106. Thanks!!
  107.  
  108. ..........................................................................
  109. John Purlia          : My brain; not my company's brain.  My brain says...
  110. jpurlia@qualcomm.com :      "Just about any movie could be made better
  111. AppleLink:  AM0470   :       if one of the characters were a vampire."
  112. ..........................................................................
  113.  
  114.  
  115. +++++++++++++++++++++++++++
  116.  
  117. From: Matt Slot <fprefect@caen.engin.umich.edu>
  118. Organization: CAEN Mac Support
  119. Date: Mon, 1 Jun 1992 14:04:38 GMT
  120.  
  121. You need to create a 'dctb' resource for your Dialog. Set all
  122.    of the fields to the default (black or white, as appropriate).
  123.    When you load the dialog, it is now smart enough to make it a
  124.    Color Grafport.
  125. If you have problems, you can mail me and I'll drop a binhex 
  126.    Resedit file with the above resource. WARNING: The dialog
  127.    editor in ResEdit 2.x has been known to die horribly. You
  128.    should only create/modify copies of your resource file, and
  129.    copy them across later. (This is from experience!!!)
  130.    
  131. fprefect@caen.engin.umich.edu
  132. Matt Slot, CAEN Mac-Support
  133.  
  134. +++++++++++++++++++++++++++
  135.  
  136. From: rsherman@mthvax.cs.miami.edu (Roby Sherman)
  137. Date: 1 Jun 92 14:21:59 GMT
  138. Organization: The Tao of Programming
  139.  
  140. In <1992Jun1.012644.20066@qualcomm.com> jpurlia@qualcomm.com (John Purlia) writes:
  141.  
  142. >I'm trying to use System 7's handy PlotIconID function to display small
  143. >color icons in a dialog box, but the icons always appear black & white.
  144. >There are two places I'm attempting to plot the icons in the dialog:
  145. >a user item, and within an LDEF.  I should also note that the dialog itself
  146. >is being tossed about via SFPGetFile and extensions I've made to standard
  147. >get file.
  148.  
  149. >All my icon resources are defined, the destination Rect for each icon is
  150. >16 x 16 pixels, and I am able to draw color pictures in the dialog... but
  151. >no color icons.
  152.  
  153. Sounds like your not calling "GetNewCDialog" but rather the old B & W
  154. version of the call...
  155.  
  156. Don't ask *ME* why, but you can draw color pictures in grafports using
  157. DrawPicture, but you can't plot color icons that way. You need to have a
  158. Cgrafport setup...
  159.  
  160.  
  161.                             --Roby
  162. - -- 
  163. rsherman@mthvax.cs.miami.edu                    Roby Sherman
  164.  
  165. +++++++++++++++++++++++++++
  166.  
  167. From: alexr@apple.com (Alexander M. Rosenberg)
  168. Date: 1 Jun 92 18:22:48 GMT
  169. Organization: Hackers Anonymous
  170.  
  171. In article <1992Jun1.012644.20066@qualcomm.com>, jpurlia@qualcomm.com (John Purlia) writes:
  172. > I'm trying to use System 7's handy PlotIconID function to display small
  173. > color icons in a dialog box, but the icons always appear black & white.
  174. > There are two places I'm attempting to plot the icons in the dialog:
  175. > a user item, and within an LDEF.  I should also note that the dialog itself
  176. > is being tossed about via SFPGetFile and extensions I've made to standard
  177. > get file.
  178.  
  179. You use a custom DITL. You should create a 'dctb' resourcce for that DITL so
  180. that the Dialog Manager calls made by the Standard File package result in
  181. color grafports. I'm told that an empty 'dctb' can be made, and I would
  182. vote that that's the way to go, otherwise, do as ResEdit does, and have a
  183. wierd color for the Title color entry (which is unused in Standard File).
  184.  
  185. My assumption is that the Icon Utilities stuff checks the grafport. I could
  186. be wrong. An indicator that you need a 'dctb' is if the gray text in the
  187. buttons is dithered instead of true gray. The button controls draw in the
  188. grafport, whereas the window frames and scroll bars are drawn in the window
  189. manager port.
  190.  
  191. - ---------------------------------------------------------------------------
  192. - -  Alexander M. Rosenberg  - INTERNET: alexr@apple.com      - Yoyodyne    -
  193. - -  330 Waverley St., Apt B - UUCP:ucbvax!apple!alexr        - Propulsion  -
  194. - -  Palo Alto, CA 94301     -                                - Systems     -
  195. - -  (415) 329-8463          - Nobody is my employer so       - :-)         -
  196. - -  (408) 974-3110          - nobody cares what I say.       -             -
  197.  
  198.  
  199. +++++++++++++++++++++++++++
  200.  
  201. From: mlanett@void.ncsa.uiuc.edu (Mark Lanett)
  202. Organization: University of Illinois at Urbana
  203. Date: Tue, 2 Jun 1992 00:44:02 GMT
  204.  
  205. >In article <1992Jun1.012644.20066@qualcomm.com>, jpurlia@qualcomm.com (John Purlia) writes:
  206. >> 
  207. >> I'm trying to use System 7's handy PlotIconID function to display small
  208. >> color icons in a dialog box, but the icons always appear black & white.
  209. >> There are two places I'm attempting to plot the icons in the dialog:
  210. >> a user item, and within an LDEF.  I should also note that the dialog itself
  211. >> is being tossed about via SFPGetFile and extensions I've made to standard
  212. >> get file.
  213. >> 
  214.  
  215. I had the rather bizarre situation in a MacApp program that PlotIconID / 
  216. PlotIconHandle would plot a cicn, rather than the claimed ic?? family. So until
  217. I made a cicn I had b/w icons being plotted.
  218. - -- 
  219. Have a bajillion brilliant Jobsian lithium licks. | Apple (tba)
  220. Mark Lanett, not speaking for anybody             | NCSA (mlanett@uiuc.edu)
  221.  
  222. +++++++++++++++++++++++++++
  223.  
  224. From: mlanett@void.ncsa.uiuc.edu (Mark Lanett)
  225. Organization: University of Illinois at Urbana
  226. Date: Wed, 3 Jun 1992 18:03:33 GMT
  227.  
  228. mlanett@void.ncsa.uiuc.edu (Mark Lanett) writes:
  229.  
  230. [something about needing cicns to plot icl8s]
  231.  
  232. Never mind that post; I was clearly on drugs when I wrote the code. If you
  233. use PlotCIconHandle (as opposed to PlotCIconID) you will naturally get cicns
  234. plotted...
  235. - -- 
  236. Have a bajillion brilliant Jobsian lithium licks. | mlanett@apple.com - faster
  237. Mark Lanett, not speaking for anybody         | mlanett@ncsa.uiuc.edu - better
  238.  
  239. ---------------------------
  240.  
  241. From: lupini@cs.sfu.ca (Peter Lupini)
  242. Subject: Quadra, SFPGetFile, Bus Error = HELP!
  243. Organization: Simon Fraser University
  244. Date: Fri, 29 May 1992 19:50:27 GMT
  245.  
  246. Hi, 
  247.  
  248. I have just started fooling around with macintosh programing (as opposed
  249. to using the mac to write ANSI C code for research).  Here is my problem:
  250.  
  251. I am playing with the TinyEdit application in THINK C 5.02 trying to find
  252. out why an error is occuring.  I have narrowed it down to the following
  253. scenario.
  254.  
  255. I have declared a ChooseFile routine in the CEditApp which overrides the 
  256. one in CApplication.  If I make it exactly the same, of course it works
  257. fine.  Then I use ResEdit to copy the standard dialog resource (id=-4000)
  258. into my TinyEdit resource file, and give it an id of 128 (I have tried 
  259. many different id and get the same problem).
  260.  
  261. Now I modify the code so that it calls SFPGetFile with my new id (128).
  262. Since the resource is exactly the same as the copied standard one (-4000)
  263. I expect that it should all work fine, but instead I get a bus error. I 
  264. have reason to believe that this is only happening on Quadras, and it 
  265. happens with or without the cache switch on.  Here is the code snippet -
  266. can anyone help?
  267.  
  268. Thanks, 
  269. Peter
  270.  
  271.  
  272.  
  273. void CEditApp::ChooseFile( SFReply *macSFReply)
  274. {
  275.    Point      corner;
  276.    Boolean    wasLocked;
  277.    short      id;
  278.     
  279.    id = 128; /* this is my copy of resource -4000 */
  280.                                         /* Center dialog box on the screen    */
  281.    FindDlogPosition('DLOG', id, &corner);
  282.     
  283.    wasLocked = Lock( TRUE);
  284.     
  285.    SFPGetFile(corner, "\p", sfFileFilter, sfNumTypes, sfFileTypes,
  286.               sfGetDLOGHook, macSFReply, id, sfGetDLOGFilter);
  287.                 
  288.    Lock( wasLocked);
  289. }
  290.  
  291.  
  292. +++++++++++++++++++++++++++
  293.  
  294. From: jpugh@apple.com (Jon Pugh)
  295. Date: 3 Jun 92 21:05:04 GMT
  296. Organization: Apple Co.
  297.  
  298. In article <1992May29.195027.17930@cs.sfu.ca>, lupini@cs.sfu.ca (Peter Lupini) writes:
  299. > Hi, 
  300. > I have just started fooling around with macintosh programing (as opposed
  301. > to using the mac to write ANSI C code for research).  Here is my problem:
  302. > I am playing with the TinyEdit application in THINK C 5.02 trying to find
  303. > out why an error is occuring.  I have narrowed it down to the following
  304. > scenario.
  305. > I have declared a ChooseFile routine in the CEditApp which overrides the 
  306. > one in CApplication.  If I make it exactly the same, of course it works
  307. > fine.  Then I use ResEdit to copy the standard dialog resource (id=-4000)
  308. > into my TinyEdit resource file, and give it an id of 128 (I have tried 
  309. > many different id and get the same problem).
  310. > Now I modify the code so that it calls SFPGetFile with my new id (128).
  311. > Since the resource is exactly the same as the copied standard one (-4000)
  312. > I expect that it should all work fine, but instead I get a bus error. I 
  313. > have reason to believe that this is only happening on Quadras, and it 
  314. > happens with or without the cache switch on.  Here is the code snippet -
  315. > can anyone help?
  316.  
  317. My first wild guess is Boomerang, or some other Standard File patcher.  I had
  318. some problems with my Quadra and Standard File for a while.  I am now running
  319. Super Boomerang 3.02 and not having any trouble.
  320.  
  321. Of course, it could be something completely different.
  322.  
  323. Jon
  324.  
  325. ---------------------------
  326.  
  327. From: mspace@netcom.com (Brian Hall)
  328. Subject: Looking for apps that can receive data via AE!
  329. Date: Mon, 01 Jun 92 07:12:12 GMT
  330. Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
  331.  
  332.  
  333. We are developing some powerful Apple event-based software, to be released this
  334. summer, that will allow applications to receive data from some very interesting
  335. sources.  If you have an application that can handle incoming content-related
  336. Apple events, please drop us a private link with a brief description, since we
  337. want to work with you.  Our product will not cost you anything, will
  338. potentially bring an enormous amount of press, and can substantially expand the
  339. scope of your program.  Some of the areas we have in mind are calendars, PIMs,
  340. databases, spreadsheets, email programs, mapping software, process control
  341. applications, word processors, etc.  The only requirement is that your program
  342. be able to handle an unsolicited Apple event containing some type of data that
  343. you understand.  (If your app can also send such an Apple event, we can do some
  344. even fancier stuff too!)
  345.  
  346. We look forward to hearing from you!
  347.  
  348.  
  349. - -- 
  350.  
  351.  \ | /   | Brian Hall                 mspace@netcom.com
  352.  - : -   | Mark/Space Softworks       Applelink: markspace
  353.   /|\    |                            America Online: MarkSpace
  354.  |-+-|   |
  355. /-\|/-\  | People don't kill people, toasters kill people.
  356.  
  357. +++++++++++++++++++++++++++
  358.  
  359. From: jpugh@apple.com (Jon Pugh)
  360. Date: 3 Jun 92 20:34:44 GMT
  361. Organization: Apple Co.
  362.  
  363. In article <!p8knka.mspace@netcom.com>, mspace@netcom.com (Brian Hall) writes:
  364. > We are developing some powerful Apple event-based software, to be released this
  365. > summer, that will allow applications to receive data from some very interesting
  366. > sources.  If you have an application that can handle incoming content-related
  367. > Apple events, please drop us a private link with a brief description, since we
  368. > want to work with you.  Our product will not cost you anything, will
  369. > potentially bring an enormous amount of press, and can substantially expand the
  370. > scope of your program.  Some of the areas we have in mind are calendars, PIMs,
  371. > databases, spreadsheets, email programs, mapping software, process control
  372. > applications, word processors, etc.  The only requirement is that your program
  373. > be able to handle an unsolicited Apple event containing some type of data that
  374. > you understand.  (If your app can also send such an Apple event, we can do some
  375. > even fancier stuff too!)
  376. >  
  377. > We look forward to hearing from you!
  378.  
  379. I would also like to hear from you.  I am the Apple Events Registrar.  It is
  380. my job to preach the gospel of standard Apple Events, discourage the use of
  381. profane and blasphemous AE, keep the holy list of constants and arbitrate the
  382. conflicts therein.
  383.  
  384. I am an advocate of the object model and will speak of it on any occasion.
  385. My heart belongs to AppleScript and Exemplar and conforms mightily to their
  386. ideals, but I've been known to stray by the wayside (typically after a few
  387. beers ;).
  388.  
  389. I am very interested in your Apple Event activities.  Email or call and we
  390. can chat.  I have many things to say and like to hear what you are up to.  I
  391. am confidential, discrete and partially discontiguous.
  392.  
  393. Jon Pugh
  394. kAERegistrar
  395. jpugh@apple.com
  396. Applelink: JONPUGH or REGISTRY
  397. (408) 862-7094
  398.  
  399. ---------------------------
  400.  
  401. From: essam@gagme.chi.il.us (Essam Khairullah)
  402. Subject: Data fork from resource fork--How?
  403. Organization: Gagme Public Access UNIX, Chicago, Illinois.
  404. Date: Sun, 31 May 1992 16:58:18 GMT
  405.  
  406. Yes, I know.  This is probably the stupidest question ever asked, but I need to
  407. know:  How do I open the data fork of a file whos resource fork is already open?
  408.  
  409. Basically, I am writing an INIT that needs to read from its data fork.  How can
  410. I get to it?  All of the file accessing stuff that I can find needs to have the
  411. name and volume reference number or whatever.  But if the resource fork is 
  412. already open (it has the INIT code and other resources), how can I get at the
  413. data fork?
  414.  
  415. Thanks.....
  416.  
  417. - -- 
  418.                     Essam Badi' Abu Khalil Khairullah
  419.               essam@gagme.chi.il.us
  420.                  I don't got no fancy signature!
  421. I'm a .signature virus. You can't resist copying me into your .signature!
  422.  
  423. +++++++++++++++++++++++++++
  424.  
  425. From: wysocki@husc.harvard.edu (Chris Wysocki)
  426. Date: 1 Jun 92 19:21:23 GMT
  427. Organization: Harvard University, Cambridge, MA
  428.  
  429. In article <1992May31.165818.6320@gagme.chi.il.us>, essam@gagme.chi.il.us
  430. (Essam Khairullah) writes:
  431.  
  432. > How do I open the data fork of a file whos resource fork is already open?
  433. > Basically, I am writing an INIT that needs to read from its data fork.  How can
  434. > I get to it?  All of the file accessing stuff that I can find needs to have the
  435. > name and volume reference number or whatever.  But if the resource fork is 
  436. > already open (it has the INIT code and other resources), how can I get at the
  437. > data fork?
  438.  
  439. Call PBGetFCBInfo() to get the name, vRefNum and dirID of the resource fork,
  440. which you can then pass to one of the Open calls to open the data fork.  In
  441. C, and using FSSpecs:
  442.  
  443.     FCBPBRec    fcbpb;
  444.     FSSpec      fss;
  445.     
  446.     fcbpb.ioNamePtr = (void *) fss.name;
  447.     fcbpb.ioVRefNum = 0;
  448.     fcbpb.ioRefNum = CurResFile();
  449.     fcbpb.ioFCBIndx = 0;
  450.     
  451.     if (PBGetFCBInfoSync(&fcbpb) == noErr) {
  452.         fss.vRefNum = fcbpb.ioVRefNum;
  453.         fss.parID = fcbpb.ioFCBParID;
  454.     }
  455.  
  456. Chris Wysocki
  457. wysocki@husc.harvard.edu
  458.  
  459.  
  460. +++++++++++++++++++++++++++
  461.  
  462. From: essam@gagme.chi.il.us (Essam Khairullah)
  463. Organization: Gagme Public Access UNIX, Chicago, Illinois.
  464. Date: Tue, 2 Jun 1992 16:24:21 GMT
  465.  
  466. Thanks to everyone who replied to my original message on this subject.  
  467. 9 out of 10 programmers prefer PBGetFCBInfo over any other famous national
  468. brand of Toolbox calls...
  469.  
  470. Well, now let me try it out and see if everyone was correct =8^}
  471.  
  472. - -- 
  473.                     Essam Badi' Abu Khalil Khairullah
  474.               essam@gagme.chi.il.us
  475.                  I don't got no fancy signature!
  476. I'm a .signature virus. You can't resist copying me into your .signature!
  477.  
  478. ---------------------------
  479.  
  480. From: tom@dtint.uucp (Thomas R. Kimpton)
  481. Subject: AESend returns OSErr -903
  482. Date: 2 Jun 92 16:04:31 GMT
  483. Organization: Digital Technology, International
  484.  
  485. The problem is, I want to send an AppleEvent to another program
  486. running on my machine, that I launched.  I get the ProcessInfoRec
  487. using the process serial number returned in the launchParamBlockRec
  488. structure.  Using the following I set up the target address,
  489. insert some other information and send the event.  AESend() returns
  490. - -903 (noPortErr - Unable to open port or bad portRefNum).  I
  491. get the same error if I use the code inside the 'notdef'.
  492. I've turned on "program linking" from the "Sharing Setup" control
  493. panel, though I don't think it has any thing to do with it.
  494.  
  495. BTW, noPortErr is not mentioned as a possible result code at
  496. the bottom of the AESend() section.
  497.  
  498. Anyone know the solution to this?
  499.  
  500. =========================== Errant code follows ==========================
  501.  
  502. #define    kTargetSignature    'BOZO'
  503.  
  504. OSErr SendCreateElement(ProcessInfoRec *procRec)
  505. {
  506. AppleEvent        myAppleEvent, reply;
  507. OSErr            err;
  508. OSType            targetSignature;
  509. AEDesc            targetAddr;
  510.  
  511. #ifdef notdef
  512.     targetSignature = kTargetSignature;
  513.     err = AECreateDesc(typeApplSignature,(Ptr)&typeStylerSignature,
  514.         sizeof(typeStylerSignature),&targetAddr);
  515. #endif
  516.     err = AECreateDesc(typeProcessSerialNumber,(Ptr)&procRec->processNumber
  517.         ,sizeof(procRec->processNumber),&targetAddr);
  518.     if(err != noErr){
  519.         printErr(0,err,"\pAEStuff.c: SendCreateElement, AECreateDesc"
  520.             ,"\p");
  521.         goto out;
  522.     }
  523.     err = AECreateAppleEvent(kAECoreSuite,kAECreateElement,&targetAddr,
  524.         kAutoGenerateReturnID, kAnyTransactionID,&myAppleEvent);
  525.  
  526.     [stuff deleted]
  527.  
  528.       err = AESend(&myAppleEvent, &reply, kAENoReply+kAECanInteract,
  529.         kAENormalPriority,kAEDefaultTimeout, nil, nil);
  530.     if(err != noErr){
  531.         printErr(0,err,"\pAEStuff.c: SendCreateElement, AESend","\p");
  532.         goto out;
  533.     }
  534.  
  535.     [stuff deleted]
  536.  
  537. }
  538.  
  539. Thanks!
  540.  
  541. - -- 
  542. - ---
  543. Tom Kimpton                            tom@dtint.dtint.com
  544. Digital Technology Int.                (801)226-2984    
  545. 500 W. 1200 South, Orem UT, 84057      FAX (801) 226-8438
  546.  
  547. +++++++++++++++++++++++++++
  548.  
  549. From: keith@taligent.com (Keith Rollin)
  550. Date: 2 Jun 92 19:25:10 GMT
  551. Organization: Taligent
  552.  
  553. In article <1992Jun2.160431.15774@dtint.uucp>, tom@dtint.uucp (Thomas R.
  554. Kimpton) writes:
  555. > The problem is, I want to send an AppleEvent to another program
  556. > running on my machine, that I launched.  I get the ProcessInfoRec
  557. > using the process serial number returned in the launchParamBlockRec
  558. > structure.  Using the following I set up the target address,
  559. > insert some other information and send the event.  AESend() returns
  560. > -903 (noPortErr - Unable to open port or bad portRefNum).  I
  561. > get the same error if I use the code inside the 'notdef'.
  562. > I've turned on "program linking" from the "Sharing Setup" control
  563. > panel, though I don't think it has any thing to do with it.
  564.  
  565. Every time I've received this error number, it's because I was trying to send an
  566. AppleEvent from a non-AppleEvent application. For instance, I once tried writing
  567. an MPW tool that told the Finder to quit. Under MPW 3.2, I'd get this error, but
  568. it would work under MPW 3.3a9. In another program I wrote, I forgot to set the
  569. High-level Event Aware bit in the SIZE resource, and was getting that error
  570. number until I set the bit.
  571.  
  572. - --
  573. Keith Rollin
  574. Phantom Programmer
  575. Taligent, Inc.
  576.  
  577.  
  578. +++++++++++++++++++++++++++
  579.  
  580. From: jackl@Apple.COM (Jack Littleton)
  581. Date: 4 Jun 92 01:36:46 GMT
  582. Organization: Apple Computer Inc., Cupertino, CA
  583.  
  584. In article <1992Jun2.160431.15774@dtint.uucp> tom@dtint.uucp (Thomas R. Kimpton) writes:
  585. >The problem is, I want to send an AppleEvent to another program
  586. >running on my machine, that I launched.  I get the ProcessInfoRec
  587. >using the process serial number returned in the launchParamBlockRec
  588. >structure.  Using the following I set up the target address,
  589. >insert some other information and send the event.  AESend() returns
  590. >-903 (noPortErr - Unable to open port or bad portRefNum).  I
  591.  
  592. Make sure that both programs have the "high level event aware" flag set  in the
  593. 'SIZE' resource.  I had experienced the same problems you've mentioned, when
  594. I realized I'd never created a 'SIZE' resource for the app sending the Apple
  595. event.  After creating the resource and setting the correct flags, everything
  596. worked fine.
  597.  
  598. Remember that both apps have to be high level event aware.
  599.  
  600. - --
  601. Jack Littleton
  602. Developer Tools Engineering
  603. Apple Computer, Inc.
  604.  
  605. - -Opinions expressed here are not necessarily the views of Apple Computer, Inc.-
  606.  
  607. - -But should be.-
  608.  
  609. - -- 
  610. Jack Littleton                Internet: jackl@apple.com
  611. MPW Compiler/Linker group     AppleLink: JACINTOSH
  612. Apple Computer, Inc.
  613.  
  614. ---------------------------
  615.  
  616. From: Adrian C Ruigrok
  617. Subject: Special command keys
  618. Organization: Bell-Northern Research
  619. Date: Tue, 2 Jun 1992 18:11:33 GMT
  620.  
  621. There are just not enough letters in the alphabet, so I would like to use
  622. Option-Command and Shift-Command alternatives for my menus.  However, I don't
  623. know how to tie into the menu manager to 
  624. a) display it correctly
  625. b) signal my application when the command key is hit.
  626.  
  627. The second I can deal with.  But displaying the special shift and option
  628. modifiers has me stumped.  Is there a really obvious way or is it documented in
  629. some place?
  630.  
  631. Thanks a million,
  632. Adrian
  633.  
  634.  
  635. - -----------------------------------
  636. Adrian C Ruigrok
  637. Bell-Northern Research
  638. Ottawa, Canada
  639.  
  640. I can never think of anything funny to say here..... 
  641.  
  642. +++++++++++++++++++++++++++
  643.  
  644. From: Ramon M. Felciano <felciano@medisg.stanford.edu>
  645. Organization: SUMMIT (Stanford Univ. Medical Media and Information
  646. Date: Tue, 2 Jun 92 19:15:45 GMT
  647.  
  648.  
  649. Adrian --
  650.  
  651. This may or may not solve your problem, but I've got an MDEF that
  652. supports all of the modifier-key alternatives. I also have the pascal
  653. code to solve #2 for you.
  654.  
  655. It currently has one drawback: it uses the icon field of the MENU
  656. resource to indicate which modifier keys to match against, so you can't
  657. use icons in your menus.
  658.  
  659. If you're interested, send me e-mail at felciano@camis.stanford.edu
  660.  
  661. Ramon M. Felciano
  662. Associate Director, SUMMIT
  663. Stanford University Medical Media and Information Technologies
  664.  
  665. +++++++++++++++++++++++++++
  666.  
  667. From: alexr@apple.com (Alexander M. Rosenberg)
  668. Date: 3 Jun 92 20:47:00 GMT
  669. Organization: Hackers Anonymous
  670.  
  671. In article <1992Jun2.191545.18127@leland.Stanford.EDU>, felciano@medisg.stanford.edu (Ramon M. Felciano) writes:
  672. > This may or may not solve your problem, but I've got an MDEF that
  673. > supports all of the modifier-key alternatives. I also have the pascal
  674. > code to solve #2 for you.
  675. > It currently has one drawback: it uses the icon field of the MENU
  676. > resource to indicate which modifier keys to match against, so you can't
  677. > use icons in your menus.
  678.  
  679. I recently discovered that these special MDEFs used by many popular
  680. applications also assume that they should use Chicago 12 for drawing.
  681.  
  682. Use TextFont(0) and TextSize(0). You'll get the correct results for any
  683. given localized system.
  684.  
  685. Also, since this drawing occurs in the Window Manager Port, please do
  686. save and restore all the settings in the port that you or any routine
  687. you call might change. (Several popular applicaitons are guilty of this.
  688. This is why the Popup CDEF would sometimes draw in Geneva 12 when asked for
  689. Geneva 9. The Window Maanger Port had been changed to TextFont(0),
  690. TextSize(12), which isn't correct anyway.)
  691.  
  692. - ---------------------------------------------------------------------------
  693. - -  Alexander M. Rosenberg  - INTERNET: alexr@apple.com      - Yoyodyne    -
  694. - -  330 Waverley St., Apt B - UUCP:ucbvax!apple!alexr        - Propulsion  -
  695. - -  Palo Alto, CA 94301     -                                - Systems     -
  696. - -  (415) 329-8463          - Nobody is my employer so       - :-)         -
  697. - -  (408) 974-3110          - nobody cares what I say.       -             -
  698.  
  699. ---------------------------
  700.  
  701. From: danny@utkux1.utk.edu (Danny McCampbell)
  702. Subject: Background Printing Question?
  703. Organization: University of Tennessee
  704. Date: Mon, 1 Jun 1992 18:09:01 GMT
  705.  
  706. For some reason when my program goes to print it will not recognize
  707. that BackGround Printing is turned on.
  708.  
  709. thePrRecHandle^^.prJob.bJDocLoop is always 0 for draft printing even
  710. though the file is saved to disk and then printed by PrintMonitor.
  711.  
  712. Is there another way to determine whether or not background printing
  713. is turned on?  Any ideas?
  714.  
  715. Danny McCampbell
  716.  
  717. PS  If background printing is on, I was just wanting to let users
  718. know the file was being saved to disk and would be printed in the
  719. background.
  720.  
  721. +++++++++++++++++++++++++++
  722.  
  723. From: danny@utkux1.utk.edu (Danny McCampbell)
  724. Organization: University of Tennessee
  725. Date: Tue, 2 Jun 1992 20:43:22 GMT
  726.  
  727. I posted this once before but I am not sure it went through so I am posting
  728. it again.
  729.  
  730. I am checking to see if thePrRecHandle^^.prJob.bJDocLoop = bSpoolLoop
  731. so I can bring up a dialog telling the user that the file will be saved
  732. to disk and then printed in the background.
  733.  
  734. Unfortunately the result always is 0 for draft printing although if 
  735. background printing is turned on it spools the job anyway and prints
  736. fine.
  737.  
  738. Can anyone help me out on why this is happening.  Is there something
  739. else I need to check for to see if background printing is turned on?
  740.  
  741. Thanks in advance.
  742.  
  743. Danny McCampbell
  744.  
  745. +++++++++++++++++++++++++++
  746.  
  747. From: casseres@apple.com (David Casseres)
  748. Date: 3 Jun 92 17:23:07 GMT
  749. Organization: Apple Computer, Inc.
  750.  
  751. In article <1992Jun2.204322.27513@utkux1.utk.edu>, danny@utkux1.utk.edu (Danny
  752. McCampbell) writes:
  753. > I am checking to see if thePrRecHandle^^.prJob.bJDocLoop = bSpoolLoop
  754. > so I can bring up a dialog telling the user that the file will be saved
  755. > to disk and then printed in the background.
  756. > Unfortunately the result always is 0 for draft printing although if 
  757. > background printing is turned on it spools the job anyway and prints
  758. > fine.
  759.  
  760. It won't work, because bJDocLoop is a vestige from the days when the only kind
  761. of printer was the ImageWriter.  It only tells you whether you are supposed to
  762. call PrPicFile, in the case where a) the printer is an ImageWriter and b) it is
  763. using the ImageWriter-specific spooling mechanism.
  764.  
  765. The background printing mechanism introduced with MultiFinder is completely
  766. different, and does not require you to call PrPicFile.  That's why it always
  767. tells you it's doing "draft printing."
  768.  
  769. > Can anyone help me out on why this is happening.  Is there something
  770. > else I need to check for to see if background printing is turned on?
  771.  
  772. There's nothing provided by the printing code to tell you this.  You might be
  773. able to find a hack, but it would be unsupported.
  774.  
  775. - --
  776. David Casseres
  777. Exclaimer: Wow!
  778.  
  779. ---------------------------
  780.  
  781. From: tel@adimail.uucp (Terry Monks)
  782. Subject: Reading foreign disks
  783. Organization: Automata Design, Inc.
  784. Date: Mon, 1 Jun 1992 19:00:15 GMT
  785.  
  786. I want to attempt to read 3.5 in diskettes from my Ensoniq synthesizer
  787. in the Mac. I know that this can be done on PCs, but the address marks
  788. and everything else on the diskettes make them look too foregn for the
  789. Mac.
  790.  
  791. Is there information on reading non-Apple diskettes available? Surely 
  792. the same problem occurs with PC diskettes,and Sun diskettes, but both
  793. formats have been cracked by various programmers.
  794.  
  795. I have a II fx if that makes any difference.
  796.  
  797. - -- 
  798. Terry Monks        Automata Design Inc    (703) 742-9400
  799.  
  800.  
  801. +++++++++++++++++++++++++++
  802.  
  803. From: stevec@Apple.COM (Steve Christensen)
  804. Date: 2 Jun 92 21:47:35 GMT
  805. Organization: Apple Computer Inc., Cupertino, CA
  806.  
  807. tel@adimail.uucp (Terry Monks) writes:
  808. >I want to attempt to read 3.5 in diskettes from my Ensoniq synthesizer
  809. >in the Mac. I know that this can be done on PCs, but the address marks
  810. >and everything else on the diskettes make them look too foregn for the
  811. >Mac.
  812. >Is there information on reading non-Apple diskettes available? Surely 
  813. >the same problem occurs with PC diskettes,and Sun diskettes, but both
  814. >formats have been cracked by various programmers.
  815.  
  816. >I have a II fx if that makes any difference.
  817.  
  818. If the physical format of the disks is the same as PC disks, then the Mac
  819. can read the raw data from the disks, however it can't necessarily interpret
  820. what all the data means (i.e., files, directories) unless someone has written
  821. some software to convert the information on an Ensoniq disk into something
  822. that the Mac recognizes...
  823.  
  824. steve
  825.  
  826. - -- 
  827. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  828.   Steve Christensen            Never hit a man with glasses.
  829.   stevec@apple.com            Hit him with a baseball bat.
  830.  
  831. +++++++++++++++++++++++++++
  832.  
  833. From: t.g.finstad@fys.uio.no (Terje Finstad)
  834. Date: 3 Jun 92 10:48:53 GMT
  835. Organization: Dept. Physics
  836.  
  837.  
  838.  Terry Monks <tel@adimail.uucp> (Terry Monks) writes:
  839. > I want to attempt to read 3.5 in diskettes from my Ensoniq synthesizer
  840. > in the Mac. I know that this can be done on PCs, but the address marks
  841.  
  842.  ....(deleted.
  843.  
  844. > I have a II fx if that makes any difference.
  845.  
  846.  
  847. Please note that there are a least two issues
  848. 1.  Getting the mac hardware to read the diskettes as well as telling you
  849.     what has been read,including separating adress marks and data.
  850. 2.  If nescessary, transform what you have read ino meaningful information
  851.     the mac can use.
  852.  
  853. In the case of PC diskettes only issue 2 needs to be dealt with as a mac 
  854. with a superdrive has readily bult in routines that do everything else for you.
  855. You simply request a certain block number to be read, and the built in driver
  856. will do it.
  857.  
  858. In the case of Ensonique diskettes you also has to deal with issue 1. 
  859. (Ensonique diskettes have much in common to PC diskettes but uses 10 sectors 
  860.  pr. track numbered in the tagmarks as Track 0 to 9, whereas MS-DOS uses
  861.  9 sectors numbered from 1 to 9)
  862.  
  863. Since you have a IIfx, you should be able to make a device driver control
  864. call to the driver giving you the raw data. In the Tecnical Note 272 is
  865. described the call "Diagnostic Raw Track Dump (csCode=18244)".  This is
  866. not supported on all Macs and for those not one has to find other ways to 
  867. read the raw data.  
  868.  
  869. This should solve the problem for you, but not for the rest of us. 
  870. (I have found that a PC is the next best solution. 
  871. It can easily be set up to read Ensonique diskettes)
  872.  
  873. Terje   
  874.  
  875. ---------------------------
  876.  
  877. From: auajs@acvax.inre.asu.edu (Ling)
  878. Subject: How to draw a SICN
  879. Date: 1 Jun 92 20:35:14 GMT
  880. Organization: Arizona State University
  881.  
  882. This may be a silly question but:
  883. I am putting some buttons on my window and SICNs are about the right size.
  884. what I need to know is how to draw them from the resource fork to the
  885. window.  The only method I see is copybits, but copy bits takes a bit map
  886. in a different form than in the SICN resource.  I know I could convert this
  887. information, but I was looking for an easier method.
  888.  
  889.         Jim
  890.  
  891. +++++++++++++++++++++++++++
  892.  
  893. From: Andrew_Gilmartin@Brown.Edu (Andrew Gilmartin)
  894. Date: 2 Jun 92 14:30:14 GMT
  895. Organization: Computing & Information Services, Brown University
  896.  
  897. The THINK Class Library has a number of utility routines that are of
  898. general interest; one of which is DrawSICN(). Look in the file
  899. TBUtilities.c for more information (I don't want to post their code).
  900.  
  901. - -- Andrew
  902.  
  903. +++++++++++++++++++++++++++
  904.  
  905. From: keith@taligent.com (Keith Rollin)
  906. Date: 2 Jun 92 19:17:03 GMT
  907. Organization: Taligent
  908.  
  909. In article <1JUN92133514@acvax.inre.asu.edu>, auajs@acvax.inre.asu.edu (Ling)
  910. writes:
  911. > This may be a silly question but:
  912. > I am putting some buttons on my window and SICNs are about the right size.
  913. > what I need to know is how to draw them from the resource fork to the
  914. > window.  The only method I see is copybits, but copy bits takes a bit map
  915. > in a different form than in the SICN resource.  I know I could convert this
  916. > information, but I was looking for an easier method.
  917.  
  918. See Technote #252: "Plotting Small Icons" (which shows the copybits method) or
  919. #306, which talks about 7.0's icon plotting routines.
  920.  
  921. - --
  922. Keith Rollin
  923. Phantom Programmer
  924. Taligent, Inc.
  925.  
  926.  
  927. ---------------------------
  928.  
  929. From: jryan@adobe.com (Jim Ryan)
  930. Subject: button in a window
  931. Date: 19 May 92 21:12:11 GMT
  932. Organization: Adobe Systems Incorporated
  933.  
  934. What is the best way to draw a button in a window?  I'm currently 
  935. drawing it with QD, and hiliting it, unhiliting it, etc when checking
  936. for mousedown in the button's rect.  My problem currently is, how do I get
  937. the button to unhilite when the cursor leaves the rect, but still in
  938. a mousedown?  I'd love to hear that there is a way to easily create a button 
  939. in a window like in a dialog, but I can't find any reference 
  940. to it in IM.  Any suggestions?
  941.  
  942. Thanx,
  943. jr
  944.  
  945. +++++++++++++++++++++++++++
  946.  
  947. From: zobkiw@world.std.com (Joe Zobkiw)
  948. Organization: The World Public Access UNIX, Brookline, MA
  949. Date: Wed, 20 May 1992 12:28:45 GMT
  950.  
  951. << What is the best way to draw a button in a window? >>
  952.  
  953. Depending on how much of a window this is, you may want to use a DLOG/DITL
  954. and simply treat it as a normal window. This will give you automatic
  955. button handling (ie: via IsDialogEvent(), etc.)
  956.  
  957. - -- 
  958. - -- joe zobkiw                      Internet: zobkiw@world.std.com
  959. - --                                      AOL: AFL Zobkiw  
  960. - -- mac.synthesis.MIDI.THINK C.OOP.asm   CI$: 70712,515 
  961. - -- communications.networks.cool tunes...
  962.  
  963. +++++++++++++++++++++++++++
  964.  
  965. From: tom@dtint.uucp (Thomas R. Kimpton)
  966. Organization: Digital Technology, International
  967. Date: Fri, 29 May 92 16:52:37 GMT
  968.  
  969. In article <BoJuny.MB9@world.std.com> zobkiw@world.std.com (Joe Zobkiw) writes:
  970. ><< What is the best way to draw a button in a window? >>
  971. >
  972. >Depending on how much of a window this is, you may want to use a DLOG/DITL
  973. >and simply treat it as a normal window. This will give you automatic
  974. >button handling (ie: via IsDialogEvent(), etc.)
  975. >
  976.  
  977. You can add controls to any window using NewControl/GetNewControl.
  978. When you get mouseDowns in your window use FindControl to
  979. determine which control, if any the mouseDown occurred in.
  980.  
  981. Read the Control Manager section in IM Vol 1 for detailed information.
  982. - -- 
  983. - ---
  984. Tom Kimpton                            tom@dtint.dtint.com
  985. Digital Technology Int.                (801)226-2984    
  986. 500 W. 1200 South, Orem UT, 84057      FAX (801) 226-8438
  987.  
  988. ---------------------------
  989.  
  990. From: Nigel_Williams@qm.admin.utas.edu.au (Nigel Williams)
  991. Subject: vdig component for DigiVideo (Q)
  992. Organization: University of Tasmania, Australia
  993. Date: Wed, 3 Jun 1992 05:25:47 GMT
  994.  
  995. I am attempting to use the DigiVideo vdig component that was on the
  996. beta QuickTime CD. The DigiVideo card was manufactured by AAPS, later taken
  997. up by Sequel Development.
  998.  
  999. Does anyone know if there is an updated version available (perhaps on the
  1000. release QT Development CD)?
  1001.  
  1002. My specific interest is to switch the vdig component into a mode where
  1003. it grabs greyscale images rather than colour (our camera is B&W).
  1004. I am expecting to do this using VDSetInputColorSpaceMode; I assume if I am using
  1005. the sequence grabber to drive the vdig I can
  1006. coerce the result of ComponentInstance SGGetVideoDigitizerComponent(SGChannel c)
  1007. to a VideoDigitizerThing (am I right in thinking they refer to the same object?).
  1008.  
  1009. Having posted this question directly to Sequel via AppleLink without response
  1010. (are they still in business?) and to the QuickTime discussion folders
  1011. on AppleLink also without response, perhaps the Internet community
  1012. has the answer.
  1013.  
  1014. Any suggestions/comments appreciated.
  1015.  
  1016.  
  1017.  
  1018. +++++++++++++++++++++++++++
  1019.  
  1020. From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
  1021. Date: 3 Jun 92 18:59:22 +1200
  1022. Organization: University of Waikato, Hamilton, New Zealand
  1023.  
  1024. In article <1992Jun3.052547.2052@newsroom.utas.edu.au>, Nigel_Williams@qm.admin.utas.edu.au (Nigel Williams) writes:
  1025. > I am attempting to use the DigiVideo vdig component that was on the
  1026. > beta QuickTime CD. The DigiVideo card was manufactured by AAPS, later taken
  1027. > up by Sequel Development.
  1028. >
  1029. > Does anyone know if there is an updated version available (perhaps on the
  1030. > release QT Development CD)?
  1031. >
  1032. > My specific interest is to switch the vdig component into a mode where
  1033. > it grabs greyscale images rather than colour (our camera is B&W).
  1034.  
  1035. I'm not familiar with this video card, but what happens if you call
  1036. VDSetPlayThruDestination and specify a pixmap from an eight-bit greyscale
  1037. offscreen GWorld? Would that work?
  1038.  
  1039. Another trick that may work with cards that don't autosense NTSC/PAL mode
  1040. (it certainly works with our Moonraker) is to call VDSetInputStandard and
  1041. specify the wrong one. That is, specify NTSC if your source is actually
  1042. PAL, or vice versa. Of course, this assumes your card is able to handle
  1043. both signals, and will sync to the actual incoming scanning frequences,
  1044. not the official ones for the standard you specify. What happens is that
  1045. it looks for the colour information in the wrong format, doesn't find it,
  1046. and give you a black-and-white signal instead.
  1047.  
  1048. What a pity my VideoSpigot LC is too smart to be fooled by this trick :-}...
  1049.  
  1050. > I am expecting to do this using VDSetInputColorSpaceMode; I assume if I am using
  1051. > the sequence grabber to drive the vdig I can
  1052. > coerce the result of ComponentInstance SGGetVideoDigitizerComponent(SGChannel c)
  1053. > to a VideoDigitizerThing (am I right in thinking they refer to the same object?).
  1054.  
  1055. I can't remember offhand what VDSetInputColorSpaceMode does, but, yes,
  1056. all references to "thing" in the pre-release interfaces are now "component",
  1057. so a "VideoDigitizerThing" is now a "VideoDigitizerComponent". Are your
  1058. interfaces all up-to-date?
  1059.  
  1060. Lawrence D'Oliveiro                       fone: +64-7-856-2889
  1061. Computer Services Dept                     fax: +64-7-838-4066
  1062. University of Waikato            electric mail: ldo@waikato.ac.nz
  1063. Hamilton, New Zealand    37^ 47' 26" S, 175^ 19' 7" E, GMT+12:00
  1064. Any opinions the author has expressed in this posting are sacred to
  1065. Epimetheus, the Greek god of hindsight.
  1066.  
  1067. ---------------------------
  1068.  
  1069. End of C.S.M.P. Digest
  1070. **********************
  1071.